﻿CREATE proc [dbo].[proc_CheckInOut_In]
(
	@Id int,
	--@CustomerId nvarchar(50),
	@UserName nvarchar(50),
	@CheckInTime datetime,
	@ResultFlag int,
	@ResultText nvarchar(50)
	--@OneText nvarchar(200),
	--@TwoText nvarchar(200),
	--@TreeText nvarchar(200),
	--@FourText nvarchar(200),
	--@PublicityDemandId int,
	--@NetworkConsciousnessId int
)
as
	begin
	Update CheckInOut Set
	ResultFlag=@ResultFlag,
	ResultText=@ResultText,
	CheckInTime=@CheckInTime Where Id=@Id and UserName=@UserName
	
	--Insert Into Customer_Subjoin_List(CustomerId,SubjoinId,Description,UpName,UpTime) Values
	--(@CustomerId,1,@OneText,@UserName,@CheckInTime)
	--Insert Into Customer_Subjoin_List(CustomerId,SubjoinId,Description,UpName,UpTime) Values
	--(@CustomerId,2,@TwoText,@UserName,@CheckInTime)
	--Insert Into Customer_Subjoin_List(CustomerId,SubjoinId,Description,UpName,UpTime) Values
	--(@CustomerId,3,@TreeText,@UserName,@CheckInTime)
	--Insert Into Customer_Subjoin_List(CustomerId,SubjoinId,Description,UpName,UpTime) Values
	--(@CustomerId,4,@FourText,@UserName,@CheckInTime)
	
	--Update Customer Set PublicityDemandId=@PublicityDemandId,NetworkConsciousnessId=@NetworkConsciousnessId
	--Where CustomerId=@CustomerId

	return 1

	end
